import 'package:flutter/material.dart';
import 'package:get/get.dart';

Future<bool> showConfirmDialog(String confirmContent) async {
  bool result = false;
  await Get.defaultDialog(
      barrierDismissible: false,
      title: "确认信息",
      content: Text(confirmContent),
      confirm: ElevatedButton(
          onPressed: () {
            result = true;
            Navigator.pop(Get.context!);
          },
          child: Text("确认")),
      cancel: TextButton(
          onPressed: () {
            result = false;
            Navigator.pop(Get.context!);
          },
          child: Text("取消")));
  return result;
}
